home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld France 1
/
MacWorld France - Issue 01.iso
/
Sélection Macworld
/
Libre Copie
/
Gestion du disque dur
/
GSU-ForkOff
/
Fork Off - Read Me
< prev
next >
Wrap
Text File
|
1995-03-26
|
3KB
|
56 lines
RELEASE NOTES FOR FORK OFF
This is a utility of the 'one dumb job' variety. It does one job, and
does it fast and with minimal hoorah.
Fork Off is SYSTEM 7 ONLY. Its only interface is Drag and Drop, so you
cannot use it with earlier Systems. If you double-click on it from a
System 6 machine, you will get an error message and the software will
quit gracefully.
To use Fork Off _with_ System 7, simply select the files you want to
modify and drag them on the program's icon or an alias of it. The files
you drag and drop will be _irrevocably_ modified, so BE CAREFUL!
Fork Off does this: it eliminates the resource fork from any file that
is fed to it. It will eat files of any type, and it is very fast.
Why would you want to do this? Certain applications - such as BBEdit -
store information useful to them in the resource fork. While nice, this
data is inessential, and the disk space it uses adds up. If you're done
editing these files, you have nothing to gain from keeping the resource
fork data. There are other analagous situations. For example, if you're
moving a Mac TEXT file to a DOS or UNIX machine, the resource fork may
or may not be carried over, but it will not be used in any case; might
as well get rid of it.
Why WOULDN'T you want to do this? Many Macintosh files carry critical,
irreplaceable information in the resource fork. Every application
program is _all_ resources. Every Type 1 Postscript font is _all_
resources. Many data files use the resource fork to supplement the data
fork - TeachText/SimpleText files and Nisus files are examples. Fork Off
kills the resource fork in EVERY file it sees. If you drag and drop a
file that will suffer for losing its resource fork, THE CHANGE IS
IRREVOCABLE.
The programming to achieve this change is actually quite simple. After
a bit of overhead, we do:
OpenRF (infile.fName, infile.vRefNum, &INfRefNum);
SetEOF (INfRefNum, 0L);
FSClose (INfRefNum);
The first line opens the resource fork and the second line sets its
length (its EndOfFile) to zero bytes. There can't be any resources in a
zero length resource fork, so all of the resources are thrown away and
the operating system opens up the disk blocks formerly occupied by
those resources.
I wrote this in response to a couple of queries that appeared in the
Info-Mac Archive list. I hope that it proves useful to those two
people, and to anyone else who might need it. And I hope EVERYONE will
BE CAREFUL. The file you save may be your own...
Greg Swann
3/26/95